package com.example.recordingpen_datacollection.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.recordingpen_datacollection.entity.UserLogin;
import com.example.recordingpen_datacollection.mapper.UserLoginMapper;
import com.example.recordingpen_datacollection.service.UserLoginService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xg
 * @since 2024-06-04
 */
@Service
public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin> implements UserLoginService {

    @Override
    public boolean verifyUser(Integer userId, Integer loginId) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("uid",userId);
        wrapper.eq("devId",loginId);
        UserLogin one = this.getOne(wrapper);
        if(one == null){
            return false;
        } else {
            return true;
        }


    }
}
